/*
 ============================================================================
 Name		: FbTopTabgroup.h
 Author	  : ceze
 Version	 : 1.0
 Copyright   : FlashBox for ver.Zhongyou(���ʰ�)
 Description : CFbTopTabgroup declaration
 ============================================================================
 */

#ifndef FBTOPTABGROUP_H
#define FBTOPTABGROUP_H

#include "FbTabgroup.h"

// CLASS DECLARATION

/**
 *  CFbTopTabgroup
 * 
 */
class CFbTabgroupTop : public CFbTabgroup
{
public:
	// Constructors and destructor

	/**
	 * Destructor.
	 */
	~CFbTabgroupTop ();

	/**
	 * Two-phased constructor.
	 */
	static CFbTabgroupTop* NewL (const TRect& aRect, CCoeControl *pParent );

	/**
	 * Two-phased constructor.
	 */
	static CFbTabgroupTop* NewLC (const TRect& aRect, CCoeControl *pParent );

	/*
	 * From CoeControl,
	 * 按键事件接收处理
	 */
	TKeyResponse OfferKeyEventL (const TKeyEvent &aKeyEvent, TEventCode aType );

	/**
	 * 通过序号激活tab项
	 * Hightlight (activate) a tab.
	 */
	void SetActiveTabByIndexL (TInt aTabIndex );

	/**
	 * Add TabItem
	 */
	void AddTabL (TInt aTabId, const TDesC& aResFileName, const TInt& aResImageId, 
			const TInt& aResImageMaskId, const TInt& aResBackId, const TInt & aResTextId =0 );
	
	 /**
	 * set tabs dimmed
	 */
	void SetTabsDimmed (TBool aDimmed );
	
	//inline IsTabsDimmed(){return m_isTabDimmed;}

	/**
	 * label text
	 */
	void SetLabelText(const TDesC &aText);
	
	/**
	 * label text2 for Manhuashuba SubTitle
	 */
	void SetLabel2Text(const TDesC &aText);
	
	//void MakeVisible(TBool aVisible);
	
private:
	
	
	/**
	 * Constructor for performing 1st stage construction
	 */
	CFbTabgroupTop ();

	/**
	 * EPOC default constructor for performing 2nd stage construction
	 */
	void ConstructL (const TRect& aRect, CCoeControl *pParent );

	/**
	 * From CoeControl,CountComponentControls.
	 */
	TInt CountComponentControls () const;

	/**
	 * From CCoeControl,ComponentControl.
	 */
	CCoeControl* ComponentControl (TInt aIndex ) const;

	/**
	 * From CCoeControl, Draw
	 * Draw this CFbTabgroup to the screen.
	 * @param aRect the rectangle of this view that needs updating
	 */
	void Draw (const TRect& aRect ) const;
	
	

private:
	//背景图片
	//CFbsBitmap				*m_pBack;
	//logo
	CFbsBitmap *m_pAppLogo;
	CFbsBitmap *m_pTopImage;
	CFbsBitmap *m_pBottomImage;
	//
	//	CEikLabel *m_pTitleLabel;
	HBufC		*m_pTitleText;
	HBufC		*m_pSubTitleText;//For Page ManHuaShuBa!
	//
//	TBool 		m_isTabDimmed;

};

#endif // FBTOPTABGROUP_H
